<div class="container">
  <div class="row">
    <div class="hero-text">
     <h1>加班/调休记录列表</h1>
     <p class="lead">在这里管理用户的加班/调休记录</p>
     {{if .flash.error}}
    <blockquote>{{.flash.error}}</blockquote>
    {{end}}

    {{if .flash.notice}}
    <blockquote>{{.flash.notice}}</blockquote>
    {{end}}
   </div>
 </div>
</div>
</div>
{{if .IsAdmin}}
		<div class="container"><div class="row"><a href="{{urlfor "RecordController.Add" ":id" .UserId}}" title="添加记录">添加记录</a></div></div>
		{{end}}
<div class="container">
  <div class="row">
    <table class="table">
      <thead>
        <tr>
          <th>姓名</th>
          <th>记录类型</th>
		  <th>记录时间</th>
          <th>小时数</th>
		  <th>添加时间</th>	
        </tr>
      </thead>
      <tbody>
        {{range $record := .Records}}
        <tr>
          <td>{{$record.UserName}}</td>
          <td>{{$record.RestType}}</td>
          <td>{{$record.RestDate}}</td>
		  <td>{{$record.RestHours}}</td>
          <td>{{$record.RecordTime}}</td>
        </tr>
        {{end}}
      </tbody>
		{{if .IsAdmin}}
		<tfoot>
        <tr>
          <td colspan="4"><a href="{{urlfor "RecordController.Add" ":id" .UserId}}" title="添加记录">添加记录</a></td>
        </tr>
      </tfoot>
		{{end}}
    </table>
	<nav>{{str2html .page}}</nav>
  </div>
</div>
